﻿using System.Web;
using System.Web.Mvc;

namespace JuCheap.Template.Web.Controllers
{
    /// <summary>
    /// Home
    /// </summary>
    public class ThemesController : Controller
    {

        [Route("flat/{id}.html")]
        public ActionResult Flat(string id = "Index")
        {
            return View(id.Replace(".html",string.Empty));
        }

        /// <summary>
        /// Logout
        /// </summary>
        /// <returns></returns>
        public ActionResult Logout()
        {
            Request.GetOwinContext().Authentication.SignOut();
            return RedirectToAction("Flat", new {id = "login.html"});
        }
    }
}